<template>
  <div class="loading-bg">
    <van-loading vertical type="spinner">{{text}}</van-loading>
  </div>
</template>

<script>
import Vue from 'vue'
import { Loading } from 'vant'
Vue.use(Loading)
export default {
  name: 'store-loding',
  props: {
    text: {
      type: String,
      default: '正在加载...'
    }
  }
}
</script>

<style scoped>
.loading-bg {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 6px;
    border-radius: 6px;
    background-color: rgba(0,0,0,.6);
}
.van-loading {
  color: #f8f8f8;
}
.van-loading__spinner{
  width: 18px;
  height: 18px;
}
.van-loading__text{
  font-size: 12px;
  color: #f8f8f8;
}
</style>